package com.taotao.pojo;

import java.io.Serializable;
import java.util.Date;

/**
 * 商品规格参数
 */
public class ItemParam implements Serializable{

    private static final long serialVersionUID = 1977771650798331774L;

    private Long id;
    /**
     * 商品ID
     */
    private Long itemId;

    private Date created;

    private Date updated;
    /**
     * 参数数据，格式为json格式
     */
    private String paramData;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getItemId() {
        return itemId;
    }

    public void setItemId(Long itemId) {
        this.itemId = itemId;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }

    public Date getUpdated() {
        return updated;
    }

    public void setUpdated(Date updated) {
        this.updated = updated;
    }

    public String getParamData() {
        return paramData;
    }

    public void setParamData(String paramData) {
        this.paramData = paramData;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        ItemParam that = (ItemParam) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (itemId != null ? !itemId.equals(that.itemId) : that.itemId != null) return false;
        if (created != null ? !created.equals(that.created) : that.created != null) return false;
        if (updated != null ? !updated.equals(that.updated) : that.updated != null) return false;
        return paramData != null ? paramData.equals(that.paramData) : that.paramData == null;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (itemId != null ? itemId.hashCode() : 0);
        result = 31 * result + (created != null ? created.hashCode() : 0);
        result = 31 * result + (updated != null ? updated.hashCode() : 0);
        result = 31 * result + (paramData != null ? paramData.hashCode() : 0);
        return result;
    }

    @Override
    public String toString() {
        return "ItemParam{" +
                "id=" + id +
                ", itemId=" + itemId +
                ", created=" + created +
                ", updated=" + updated +
                ", paramData='" + paramData + '\'' +
                '}';
    }
}